import { SUPPLIER_TYPE_SELECT_LIST } from '@/pages/supplier/constants/common';
import {
  WHETHER_OPTIONS,
  CHECK_TIME_TYPE_OPTIONS,
  DEPARTMENT_OPTIONS,
  EXCEPTION_TYPE_OPTIONS,
  CHECK_TYPE_OPTIONS
} from '../../constants'

// 供应商管理 - 线索供应商
const FORM_ITEM_LIST = [
  {
    prop: 'supplierCode',
    label: '供应商代码',
    type: 'input'
  },
  {
    prop: 'supplierName',
    label: '供应商名称',
    type: 'input',
  },
  {
    prop: 'managementAreaId',
    label: '管理区域',
    type: 'managementArea',
  },
  {
    prop: 'belongDepartment',
    label: '采购归属',
    type: 'belongCenter',
  },
  {
    prop: 'exceptionType',
    label: '异常类型',
    type: 'select',
    clearable: true,
    options: EXCEPTION_TYPE_OPTIONS,
  },
  {
    prop: 'supplierType',
    label: '供应商类型',
    type: 'select',
    clearable: true,
    options: SUPPLIER_TYPE_SELECT_LIST,
  },
  {
    prop: 'deptCategory',
    label: '核查部门',
    type: 'select',
    clearable: true,
    options: DEPARTMENT_OPTIONS,
  },
  {
    prop: 'isCheck',
    label: '是否核查',
    type: 'select',
    clearable: true,
    options: WHETHER_OPTIONS,
  },
  {
    prop: 'checkDimension',
    label: '核查周期',
    type: 'select',
    clearable: true,
    options: CHECK_TIME_TYPE_OPTIONS,
  },
  {
    prop: 'checkType',
    label: '核查方式',
    type: 'select',
    clearable: true,
    options: CHECK_TYPE_OPTIONS,
  },
  {
    prop: 'checkUser',
    label: '核查人员',
    type: 'input',
  },
]

const TABLE_COLUMNS = [
  {
    title: '核查状态',
    key: 'checkStatusDesc'
  },
  {
    title: '问题等级',
    key: 'questionLevelDesc'
  },
  {
    title: '无问题备注',
    key: 'noQuestionRemark'
  },
  {
    title: '供应商代码',
    key: 'supplierCode'
  },
  {
    title: '供应商名称',
    key: 'supplierName',
  },
  {
    title: '管理区域',
    key: 'managementAreaName'
  },
  {
    title: '归属中心',
    key: 'belongDepartmentName'
  },
  {
    title: '业务对接人',
    key: 'businessContactName'
  },
  {
    title: '异常类型',
    key: 'exceptionTypeName'
  },
  {
    title: '供应商厂房地址',
    key: 'plantAddress'
  },
  {
    title: '供应商性质',
    key: 'supplierNatureName'
  },
  {
    title: '合作关系',
    key: 'cooperativeClassifyName'
  },
  {
    title: '主营品类代码',
    key: 'mainCategoryCode'
  },
  {
    title: '主营品类名称',
    key: 'mainCategory'
  },
  {
    title: '主营商品',
    key: 'mainProduct'
  },
  {
    title: '供应商类型',
    key: 'supplierTypeName'
  },
  {
    title: '上年度采购额',
    key: 'lastYearPurchaseAmount'
  },
  {
    title: '上年度采购频次',
    key: 'lastYearPurchaseFrequency'
  },
  {
    title: '上年度正常商品采购额',
    key: 'lastYearNormalPurchaseAmount'
  },
  {
    title: '上年度正常商品采购频次',
    key: 'lastYearNormalPurchaseFrequency'
  },
  {
    title: '上年度潜在商品采购额',
    key: 'lastYearPotentialPurchaseAmount'
  },
  {
    title: '上年度潜在商品采购频次',
    key: 'lastYearPotentialPurchaseFrequency'
  },
  {
    title: '上年度定制商品采购额',
    key: 'lastYearCustomizePurchaseAmount'
  },
  {
    title: '上年度定制商品采购频次',
    key: 'lastYearCustomizePurchaseFrequency'
  },
  {
    title: '本年度采购额',
    key: 'purchaseAmount'
  },
  {
    title: '本年度采购频次',
    key: 'purchaseFrequency'
  },
  {
    title: '本年度正常商品采购额',
    key: 'normalPurchaseAmount'
  },
  {
    title: '本年度正常商品采购频次',
    key: 'normalPurchaseFrequency'
  },
  {
    title: '本年度潜在商品采购额',
    key: 'potentialPurchaseAmount'
  },
  {
    title: '本年度潜在商品采购频次',
    key: 'potentialPurchaseFrequency'
  },
  {
    title: '本年度定制商品采购额',
    key: 'customizePurchaseAmount'
  },
  {
    title: '本年度定制商品采购频次',
    key: 'customizePurchaseFrequency'
  },
  {
    title: '上年度回访次数',
    key: 'lastYearReturnVisits'
  },
  {
    title: '本年度回访次数',
    key: 'returnVisits'
  },
  {
    title: '最近一次回访时间',
    key: 'lastReturnVisitTime'
  },
  {
    title: '上上年度潜在/定制商品价格问题次数',
    key: 'preYearProblemCount'
  },
  {
    title: '上上年度正常商品问题次数',
    key: 'preYearNormalProblemCount'
  },
  {
    title: '上年度潜在/定制商品价格问题次数',
    key: 'lastYearProblemCount'
  },
  {
    title: '上年度正常商品问题次数',
    key: 'lastYearNormalProblemCount'
  },
  {
    title: '核查部门',
    key: 'deptName'
  },
  {
    title: '是否核查',
    key: 'isCheckName',
  },
  {
    title: '核查周期（月度/季度）',
    key: 'checkDimensionName'
  },
  {
    title: '核查时间',
    key: 'checkTimeStr'
  },
  {
    title: '核查方式',
    key: 'checkTypeName'
  },
  {
    title: '核查人员',
    key: 'checkUser'
  },
  {
    title: '不核查原因',
    key: 'noCheckReason'
  },
  {
    title: '核查区域（省）',
    key: 'provinceName'
  },
  {
    title: '核查区域（市）',
    key: 'cityName'
  },
  {
    title: '核查区域（县）',
    key: 'areaName'
  },
  {
    title: '是否季节性商品',
    key: 'isSeasonalGoodsName',
  },
  {
    title: '是否库存商品',
    key: 'isStockGoodsName',
  },
]
export {
  FORM_ITEM_LIST,
  TABLE_COLUMNS
}
